#ifndef _PARTICLEENGINE_
#define _PARTICLEENGINE_
#include <iostream>
#include <windows.h>
#include <fstream>
#include <vector>
using namespace std;

class CEmitter;
class ParticleEngine
{
	vector<CEmitter*> m_vEmittersPool;
	vector<CEmitter*> m_vActiveEmitters;
	vector<int*> m_vEmittersToRemove;

	ParticleEngine(){};
	~ParticleEngine();
	ParticleEngine(const ParticleEngine* copy){};
	ParticleEngine& operator+(const ParticleEngine* assign){};
public:
	static ParticleEngine* GetInstance()
	{
		static ParticleEngine instance;
		return &instance;
	}

	int Load(string filename);
	void RemoveEffect(int* EmitterID);
	int* AddEffect(int EmitterID, int EmitterLife, float fPosX, float fPosY, bool bLooping);
	void RemoveAllEffects();

	void SetEmitterInfo(int EmitterID, float fPosX, float fPosY, float EmitterSize);

	void Update(float fElapsedTime);
	void Render();

	void Release();

};
#endif